package com.zj.fx.model.month;

import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class MonthSupplytask implements Serializable {
    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "主键id")
    private String id;

    @ApiModelProperty(value = "月评价管理id")
    private String fkEvaluationId;

    @ApiModelProperty(value = "任务年月")
    private String taskMonth;

    @ApiModelProperty(value = "供电所id")
    private String supplyId;

    @ApiModelProperty(value = "供电所名称")
    private String supplyName;

    @ApiModelProperty(value = "供电所所属分公司id")
    private String fkSubcompanyId;

    @ApiModelProperty(value = "供电所所属分公司名称")
    private String subcompanyName;

    @ApiModelProperty(value = "填报任务状态(0未填报/1分公司审核中/2分公司驳回调整/3责任部门审核中/4责任部门驳回调整/5审核完成)")
    private String taskState;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "任务生成时间")
    private Date createDate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "供电所提交时间")
    private Date commitDate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "分公司提报时间")
    private Date auditDate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "责任部门审核完成时间")
    private Date completeDate;

    @ApiModelProperty(value = "驳回原因")
    private String rejectReason;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "驳回时间")
    private Date rejectDate;

    @ApiModelProperty(value = "拓展字段--负责项总分")
    private String resScore;

    @ApiModelProperty(value = "拓展字段--负责项对应自评总分")
    private String selfScore;

    @ApiModelProperty(value = "拓展字段--主任务关联id")
    private String fkTaskId;

    @ApiModelProperty(value = "拓展字段--部门id")
    private String deptId;

    @ApiModelProperty(value = "拓展字段--审核dtl状态")
    private String auditState;

    @ApiModelProperty(value = "拓展字段--审核dtl审核时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date auditDtlDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "分公司审核截止时间")
    private Date auditStopLineDate;

    @ApiModelProperty(value = "拓展字段--ids")
    private String ids;

    @ApiModelProperty(value = "拓展字段--fkRecordid")
    private String fkRecordid;

    @ApiModelProperty(value = "拓展字段--文件id")
    private String fileId;

    @ApiModelProperty(value = "拓展字段--文件名称")
    private String fileName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "拓展字段--文件上传时间")
    private String filecreatetime;

    public MonthSupplytask(String id,String fkEvaluationId,String taskMonth,String supplyId,String supplyName,String fkSubcompanyId,String subcompanyName,String taskState,Date createDate,Date commitDate,Date auditDate,Date completeDate,String rejectReason,Date rejectDate){

        this.id = id;

        this.fkEvaluationId = fkEvaluationId;

        this.taskMonth = taskMonth;

        this.supplyId = supplyId;

        this.supplyName = supplyName;

        this.fkSubcompanyId = fkSubcompanyId;

        this.subcompanyName = subcompanyName;

        this.taskState = taskState;

        this.createDate = createDate;

        this.commitDate = commitDate;

        this.auditDate = auditDate;

        this.completeDate = completeDate;

        this.rejectReason = rejectReason;

        this.rejectDate = rejectDate;

    }

    public MonthSupplytask() {
        super();
    }

    public String dateToStringConvert(Date date) {
        if (date != null) {
            return DateUtil.format(date, "yyyy-MM-dd HH:mm:ss");
        }
        return "";
    }

}